package com.evan.designpatterns.singleton.register;

/**
 * @author :liujiapeng01
 * @date :2019-03-14 10:05
 **/
public class ThreadLocalSingleton {


    private static final ThreadLocal<ThreadLocalSingleton> THREAD_LOCAL =
            ThreadLocal.withInitial(ThreadLocalSingleton::new);


    private ThreadLocalSingleton() {
    }


    public static ThreadLocalSingleton getInstance() {
        return THREAD_LOCAL.get();
    }


}
